# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=yubikey-agent
pkgver=0.1.6
pkgrel=2
pkgdesc="Seamless ssh-agent for YubiKeys"
url="https://github.com/FiloSottile/yubikey-agent"
license="BSD-3-Clause"
arch="all"
makedepends="go pcsc-lite-dev"
source="https://github.com/FiloSottile/yubikey-agent/archive/v$pkgver/yubikey-agent-$pkgver.tar.gz"
options="!check" # no test suite

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build -ldflags "-X main.Version=$pkgver"
}

package() {
	install -Dm755 $pkgname -t "$pkgdir"/usr/bin/
}

sha512sums="
6c444f068be53efef54fa6b37ea275d13056fbd1f3944a469e4e5bb485d7a75ff7e270dbe2b61bf159532f8828c89f3a42d85cc8ff31893c81eeb6005d3ea77c  yubikey-agent-0.1.6.tar.gz
"
